<?php
    $aUsers = $template->get('aUsers');
?>
<div class="admin_header_title">USER MANAGE</div>
<div class="metro_table green_metro_style">
    <div class="metro_table_title"><i class="fa fa-bars"></i> List Users</div>
    <div class="metro_table_content">
        <div style="padding: 20px;">
            <table id="tableDisplayCatalog">
                <thead>
                    <tr>
                        <th><i class="fa fa-picture-o"></i> Image</th>
                        <th><i class="fa fa-tag"></i> User ID</th>
                        <th><i class="fa fa-info"></i> Fullname</th>
                        <th><i class="fa fa-info"></i> Username</th>
                        <th><i class="fa fa-shield"></i> Email</th>
                        <th><i class="fa fa-th"></i> Location</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                        foreach($aUsers as $aUser)
                        {
                            $temp = explode('/',$aUser['uri']);
                            $sId = end($temp);
                            echo '<tr val="'.$aUser['uri'].'">';
                            echo '<td><img src="'.(isset($aUser['image']) ? URL::getLink('upload/'.$aUser['image']) : URL::getLink('image/default_user')).'"></td>';
                            echo '<td><a href="'.$aUser['uri'].'">'.$sId.'</a></td>';
                            echo '<td>'.$aUser['name'].'</td>';
                            echo '<td>'.$aUser['givenName'].'</td>';
                            echo '<td>'.$aUser['email'].'</td>';
                            echo '<td>'.$aUser['location'].'</td>';
                            echo '<td><button class="table_bt_metro_delete"><i class="fa fa-trash-o"></i></button></td>';
                            echo "</tr>";
                        }
                    ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
        